<?php

	include("common.php");
	
	$result = mysql_query("SELECT * FROM `197_links` ORDER BY `link_id` DESC");
	$links = array();
	while($row = mysql_fetch_assoc($result)){
		array_push($links, $row);
	}
	
?>
<?php include("header.php"); ?>
<h1>好站連結</h1>
<p>滑動以檢視詳細資料，按標題即可進入該網站。</p>
<div id="links-list">
	<?php foreach($links as $row){ ?>
		<h3><a href="<?php echo $row['url']; ?>"><?php echo $row['title']; ?></a></h3>
		<div>
			<?php echo $row['description']; ?>
		</div>
	<?php } ?>
</div>
<script type="text/javascript" defer="defer">
	$("#links-list").accordion({event: "mouseover"});
</script>
<?php include("sidebar.php"); ?>
<?php include("footer.php"); ?>